package com.itheima.jdk8date;

import java.time.DayOfWeek;
import java.time.LocalDateTime;
import java.time.Month;

/*
LocalDateTime 的get方法
 */
public class Demo03 {


    public static void main(String[] args) {

        LocalDateTime date = LocalDateTime.of(2012, 11, 11, 13, 14, 55);
        System.out.println(date);
        int year = date.getYear();
        Month month = date.getMonth();
        int monthValue = date.getMonthValue();
        int dayOfMonth = date.getDayOfMonth();
        int dayOfYear = date.getDayOfYear();
        DayOfWeek dayOfWeek = date.getDayOfWeek();
        int hour = date.getHour();
        int minute = date.getMinute();
        int second = date.getSecond();
        System.out.println(year);
        System.out.println(month);
        System.out.println(monthValue);
        System.out.println(dayOfMonth);
        System.out.println(dayOfYear);
        System.out.println(dayOfWeek);
        System.out.println(hour);
        System.out.println(minute);
        System.out.println(second);



    }
}
